# Install modified versions of certain ANSI-incompatible system header files
# which are fixed to work correctly with ANSI C
# and placed in a directory that GNU C will search.
# This works properly on a Sun in system version 3.4;
# for other versions, you had better check.

mkdir /usr/local/lib/gcc-include
mkdir /usr/local/lib/gcc-include/sys
cp /usr/include/sys/ioctl.h /usr/local/lib/gcc-include/sys/ioctl.h
chmod +w /usr/local/lib/gcc-include/sys/ioctl.h
ex /usr/local/lib/gcc-include/sys/ioctl.h <<EOF
g/_IO/s/(\(.\),/('\1',/
g/#define._IO/s/'x'/x/g
wq
EOF

cp /usr/include/sys/ttychars.h /usr/local/lib/gcc-include/sys/ttychars.h
chmod +w /usr/local/lib/gcc-include/sys/ttychars.h
ex /usr/local/lib/gcc-include/sys/ttychars.h << EOF
g/CTRL/s/(\(.\))/('\1')/
g/#define.CTRL/s/'c'/c/g
wq
EOF
